<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title> 留言 </title>
		<link href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css" rel="stylesheet" />
	</head>

	<body>

<div class="container">
	<p class="bg-primary" style="text-align: center;">
		{$pager.pageNum}/{$pager.totalPage}
	</p>
	{if $hasPre}
	<button type="button" class="btn btn-info" id="btnPre" data-value="{$pager.pageNum - 1}">Pre</button>
	{/if}
	{if $hasNext}
	<button type="button" class="btn btn-info" id="btnNext" data-value="{$pager.pageNum + 1}">Next</button>
	{/if}

	<table class="table table-bordered" style="margin-top: 10px;">
		<tr>
			<th width="80%"></th>
			<th >留言时间</th>
		</tr>
		{foreach item=one from=$pager.ll}
		<tr class="active">
			<td>{$one.msg}</td>
			<td>{$one.dd}</td>
		</tr>
		{/foreach}
	</table>

</div>
	</body>
</html>
<script src="http://cdn.bootcss.com/zepto/1.1.4/zepto.min.js"></script>
<script type="text/javascript">
$(function(){
	$('#btnPre,#btnNext').click(function(){
		var pageNum = $(this).attr('data-value');
		var url = document.location.href;
		url = url.replace(/[\?\&]pageNum=\d+/, '');
		document.location.href = url + '&pageNum=' + pageNum;
	});
});
</script>